package base_grammar

import "fmt"

type Person6 struct {
	dog  Dog6
	name string
	age  int
}

type Dog6 struct {
	name, color string
	age         int
}

func struct_f6() {
	// 结构体嵌套

	var tom Person6
	tom.dog.age = 1
	tom.dog.color = "red"
	tom.dog.name = "heihei"

	tom.age = 20
	tom.name = "tom"

	fmt.Printf("tom: %v\n", tom)
}
